package org.springcloud.tencent;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: DRevelation
 * @Date: 2023/5/17 14:56
 */
@RestController
@SpringBootApplication
public class Producer2Application {
    public static void main(String[] args) {
        SpringApplication.run(Producer2Application.class, args);
    }


    @Autowired
    private RestTemplate restTemplate;

    @GetMapping
    public ResponseEntity<String> getRemoteReq() {
        return restTemplate.getForEntity("http://provider/", String.class);
    }
}
